<?php
    $APIMaxPage = 10000000;
	$appid = array(
	
		'CVpXydixg67VynVjdsPv421PPQNGkkZKoqEfkLpbmJAFzzK3miDFZzSjDHS2f8M4.eCJ61w-',		// pagedown_99999で作成
		'ivYDQhCxg64qkk6A1tkaZm72O2aIMF1t3R1V4gFD5lwI429i32wd8pZq66zU2Yh8fVv25hI-',		// pagedown_99999で作成
		'rxmOzQyxg67YKkzinVol_1QaRubGreuwJNfyo3I.Qo1jTqHWDND55UyG.dX4E6jtE1Z_jfM-',		// pagedown_99999で作成
		'voFK9yOxg65o.2AP5GLDvmeN4YCxI8BOiIOiEgFnNLBUiw.1DJSBX8bRv6AtO8yruOYmK8g-',		// pagedown_99999で作成
		'2LouBFmxg66aVtWCczV1XfdcL3.TpV7TwBDN8.miWRvol4mt0rF7h2qFRufuiLkiPeD5Q1A-',		// pagedown_99999で作成
		'vVIbyk2xg65QRHJu0WSIVw6mkyYWlCpLGrfHlhlpqROQrZ6MixBxlFiZ0L2By6IJA7A3Gnc-',		// pagedown_99999で作成
		'NtwZ.JCxg66vDnbcvYAoFEXxr4CN9TNuvsbKNTcP5mgn_wRw1tRv8qQP4rXxsxnTJzwpNuU-',		// pagedown_99999で作成
		'83nNH62xg64_4aztiA0IODpDk1yJ.W3xxwqtB8wuq5lDMc8.8.Q8EF0U2GCXkdrvHeneMuo-',		// pagedown_99999で作成
		'zIIr8Kqxg67tVcNP8RwAm3VnSklgIxW9qVh_6xmpQY2PJdmildR1wF391k9t7Gwan2rXKVE-',		// pagedown_99999で作成
		'FmffoMSxg64egsiCtwjSQpOlv3ZSg2Syk3WYtXbz1Z4ATW0jgyds3DRQeS2pz8ygZRh6jMM-',		// pagedown_99999で作成

		'IhOXJF2xg65u2ot.jw.ceVGarQ1eN0cSBMJIAineD.vq1ulYLGV4J1AsO8ZNQNzDsFhGfg--',		// fromjapancojpで作成
		'H_KjKfSxg662yj83r_vXu.x80kqJtbcu.tNyBSVrVzSbTWcmKa6tEfLITy4ir9MpejVVfw--',		// fromjapancojpで作成
		'iNAH8Zqxg657HbvEagS0yXsgl2L8JF_Xq1Cxd6r_YZfpDmbF7MkJemgVpFxQl5z5ZObSzQ--',		// fromjapancojpで作成
		'9sBs0Oexg65MSvZf.0yK8ykRVhygEwQuF49Yf9JOF8vbKR1xgWYkaB383DoMA0DcCrt_mw--',		// fromjapancojpで作成
		'Lq_hPx.xg66zz.eoA6.7Rj2Pa0lEyx_eLV06CudIZFwteWdYu37_NhiAkA_..hXhkXfq0g--',		// fromjapancojpで作成
		'QZKAw16xg67CGR3pb3q4aSiCS8KYGeeNSCnWfjmHbGuqSnedW8Qa3PzLu0AU73hKU4RXtw--',		// fromjapancojpで作成
		'PPqh.x6xg67ArWwhOTZsah3fsQGw5XRsloVGBnRH426oOb6oPGm71cL_T4xlsx9Z97t.Lw--',		// fromjapancojpで作成
		'WNQERBCxg64_6tQn21r5RIVdjZUJ.ByDk4.JAVuHO28FTeVTzZ1NnHivs18uskb6vrTOow--',		// fromjapancojpで作成
		'tinEkdWxg66ZMX6oKTGs_4ifr9AXi1CzX2BGbKZEI3R_ybkx7HjS.nru8tPcQ7ghYK5RLA--',		// fromjapancojpで作成
		'c6aKQiGxg66O9QmQA9IA93NXXwOvt1jvRPO.1CLVt237dh7MZKxM30Ox.lWf17KTtvHMpQ--',		// fromjapancojpで作成

		'6pMcsNaxg66rtJuuWLEiagiIre.6lWqh5vlC4bxuusIoyB79KJ04sSIYOqrLH2EX_IBsn6o-',		// fromjapancojp1で作成
		'wh0gij6xg658Byk53Ea3gt_W.E4UUPvd_PdXRJ4F9q9jfQIfc.wguxhQdfOk57wtIJs2V9k-',		// fromjapancojp1で作成
		'bRwUkHKxg67xxrYprRJZi3A_nmo_2TfeJYCg8hnFoTbgdY_s7hY_w0X9UXmRcqVw89ssTa8-',		// fromjapancojp1で作成
		'VYqWyESxg67Hib3YXEjUtvPJaLmC_0yFLHd5eMeCh4uBiulWgqLllnriMHbFQsIPV4FyqJo-',		// fromjapancojp1で作成
		'87Sf9eixg67sqCwewgkDLqz8EZL4_KWyPh1muxTYRj927qbp2PcCOWoIl8Zgxjuwpvj03ws-',		// fromjapancojp1で作成
		'uz9Da3axg64SwIhYuu1RQ6vHtrfsXyjSgsyj.vyMXjwJEC66UeYqaKqBxQmsw8K5VPrjcnc-',		// fromjapancojp1で作成
		'JVHl3R6xg67QdlGLTZTgVKpQ1Hoj3pwLmLFpIA9Yh2PGyvACADWGEm6XXAL7zYOvVfv.wJg-',		// fromjapancojp1で作成
		'iY2hHHOxg66gLNOjULsU4bkg9Xs4Djz_ecFioRFynxnhm80YlocBxdCmfBIaHsPAo64EUbk-',		// fromjapancojp1で作成
		'o7jbaw2xg64D53LClUCdfU.5P1GA7MVL7IDO7S3Byy0Svw98n.czXZp51pg65rlKTXvFVow-',		// fromjapancojp1で作成
		'vK13H6axg66NqbRMwP20Qp7hSdwDyr5bupiC_ic58lgu6fP88lZgm1Vfx_Y_uOX4YbmPCis-',		// fromjapancojp1で作成

	);
	
	$XmlOrJson = "JSONP";
	$ItemUrl = "http://auctions.yahooapis.jp/AuctionWebService/V2/json/auctionItem?";
	$ListUrl = "http://auctions.yahooapis.jp/AuctionWebService/V2/json/search?";

	$ListModel = array(
			"Available"	=> "totalResultsAvailable",//all count
			"item"		=> array(
								"Item=>{n}"	=> array(
										"site"		=> "yahoo",
										"title"		=> "Title",
										"itemid"	=> "AuctionID",
										"img"		=> "Image",
										"price"		=> "CurrentPrice",
										"bidorbuy"	=> "BidOrBuy",
										"store"		=> "Option=>StoreIcon",
										"NewItem"	=> "Option=>NewItemIcon",
										"bids"		=> "Bids",//auction
										"starttime"	=> "",
										"endtime"	=> "EndTime",
										"timeleft"	=> ""
									)
							)
		);
	$ItemModel = array(
			"title"		=> "Title",
			"itemid"	=> "AuctionID",
			//"img"		=> "Img=>Image2",
			"img"		=> "Img=>Image1",
			"url"		=> "AuctionItemUrl",
			"price"		=> "Price",//現在価格です
			"quantity"	=> "Quantity",//商品の数量です。
			"bidorbuy"	=> "Bidorbuy",//即決価格です
			"bids"		=> "Bids",//現在の入札数です
			"condition"	=> "ItemStatus=>Condition",//商品の状態です。
			"endtime"	=> "EndTime",
			"remaintime"=> "",//残り時間
			"store"		=> "Option=>StoreIcon",//有 StoreIcon :オークションストアの出品   无:一般の出品者の出品
			"postageFlag"		=> "FreeshippingIcon",//「送料無料」のアイコンのURLです。
			"taxFlag"		=> "",//0：税込1：税別
			"itemCaption"		=> "Description"//商品説明文
		);
	$Category = array(
			"All"			=>	"0",//所有
			"Electronics"	=>	"23632",//电子 家電、AV、カメラ
			"SportingGoods"	=>	"24698",//体育用品
			"Computer"		=>	"23336",//电脑
			"Automotive"	=>	"26318",//汽车
			"Blended"		=>	"26084",//其他
			"Lawn"			=>	"26086",//花、園芸
			"Toys"			=>	"25464",//玩具おもちゃ、ゲーム
			"Hobbies"				=>	"24242",//爱好 ホビー
			"HomeImprovement"		=>	"24198",//家居改善住まい、インテリア
			"Baby"			=>	"24202",//宝贝
			"Food"			=>	"23976",//食品、飲料
			"Beauty"		=>	"42177",//美容ビューティー
			"Books"			=>	"21600",//书籍
			"Watches"		=>	"23140",//钟表アクセサリー、時計
			"Fashion"		=>	"23000",//ファッション|时尚
			"Manga"			=>	"20060",//コミック、アニメグッズ|漫画
			"Classical"		=>	"20000",//古典
			"OfficeProducts"=>	"22896",//办公产品 事務、店舗用品
			"Music"			=>	"22152",//音乐
			"Video"			=>	"21964",//映画、ビデオ
			"Entertainment"	=>	"2084032594",//タレントグッズ
			"Tickets"		=>	"2084043920",//チケット、金券、宿泊予約
			"RealEstate"	=>	"2084060731",//不動産
			"FundRaisers"	=>	"2084217893",//チャリティー|慈善
			
			//"Pets"			=>	"2084055844",//ペット、生き物
			//"Cameras"		=>	"23632",//AV、カメラ
		);
		
    $priceorder = "bidorbuy";
    $minprice1  = NULL;
    $maxprice1  = NULL;
    $minprice2  = NULL;
    $maxprice2  = NULL;
    $buynow     = NULL;
	//Set $_GET into config.
		$get_buynow_value = _GET("buynow");
		if(empty($get_buynow_value)){
			$priceorder = "cbids";
			$minprice1 = _GET("Minprice");
			$maxprice1 = _GET("Maxprice");
		}else{
			$priceorder = "bidorbuy";
			$minprice2 = _GET("Minprice");
			$maxprice2 = _GET("Maxprice");
			$buynow = "1";
		}
	$SortOrder = array(
			"end,A"		=>	"end",
			"end,D"		=>	"end",
			"price,A"	=>	$priceorder,
			"price,D"	=>	$priceorder,
			"bids,A"		=>	"bids",
			"bids,D"		=>	"bids"
			);
	$ItemParam = array(
			"appid"			=>	$appid[rand(0,count($appid)-1)],
			"callback"		=>	"",
			"auctionID"		=>	_GET("itemid")//***
		);
	$yahoocateid = _GET('c');
	$ListParam = array(
			"appid"			=>	$appid[rand(0,count($appid)-1)],
			"callback"		=>	"",
			"query"			=>	$keyword,//keyword***
			"type"			=>	"",
			//"category"		=>	$Category[$_GET["c"]],//カテゴリID
			"category"		=>	checknull("id", checknull($yahoocateid, $SiteCate["auction"]["yahoo"])),
			"category_all"    => checknull("yahoo", checknull($yahoocateid, $SiteCate["auction"]["all"])),
			"page"			=>	$pagenum,//page
			//"sort"			=>	empty($_GET["s"])?"":$SortOrder[$_GET["s"]],
			//"order"			=>	strpos($_GET["s"], ",D")?"d":"a",//a ：昇順　d ：降順
			"sort"			=>	checknull(_GET("s"), $SortOrder),
			"order"			=>	strpos(_GET("s"), ",D")?"a":"d",
			"store"			=>	_GET("store"),//1 ：オークションストアの出品
			"aucminprice"	=>	$minprice1,//MinPrice
			"aucmaxprice"	=>	$maxprice1,//MaxPrice
			"aucmin_bidorbuy_price"=>	$minprice2,//即決価格
			"aucmax_bidorbuy_price"=>	$maxprice2,//即決価格
			"loc_cd"		=>	"",
			"escrow"		=>	"",
			"easypayment"	=>	"",
			"ybank"			=>	"",
			"new"			=>	"",//1 ：「new」アイコンのついた商品の絞り込み指定です。指定のない場合はすべての商品になります。
			"freeshipping"	=>	"",
			"wrappingicon"	=>	"",
			"buynow"		=>	$buynow,//即決価格が設定されている商品
			"thumbnail"		=>	"",
			"attn"			=>	"",
			"english"		=>	"",
			"point"			=>	"",
			"gift_icon"		=>	"",
			/*
			item_status
			商品状態での絞り込み指定です。
      0 ：指定なし
      1 ：新品
      2 ：中古
      指定のない場合はすべての商品になります。
			*/
			"item_status"	=>	_GET("item_status"),
			"offer"			=>	""
		);
?>